/* 基础样式 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cae;
    --text-color: #333;
    --light-bg: #f5f7fa;
    --dark-bg: #2c3e50;
    --user-bubble: #e3f2fd;
    --ai-bubble: #f1f8e9;
    --error-color: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.chat-header {
    background-color: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 40px;
    width: auto;
}

/* 主聊天区域 */
.chat-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

.chat-sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid #ddd;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.knowledge-list {
    list-style: none;
}

.knowledge-list li {
    margin-bottom: 0.5rem;
}

.knowledge-list a {
    display: block;
    padding: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.knowledge-list a:hover {
    background-color: #f0f0f0;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    background-color: var(--user-bubble);
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.ai-message {
    background-color: var(--ai-bubble);
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.system-message {
    background-color: #f5f5f5;
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    max-width: 100%;
}

/* 输入区域 */
.chat-input {
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #ddd;
}

#chat-form {
    display: flex;
    gap: 0.5rem;
}

#user-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#chat-form button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#chat-form
